package indi.qing.common;

import cn.hutool.core.codec.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.stereotype.Component;

@Component
public class CodeUtils {

    public static String encode(String str){
        String encode = Base64.encode(str);
        encode = DigestUtils.md5Hex(encode);
        return encode;
    }

    public static void main(String[] args) {
        System.out.println(encode("12345678"));
    }
}
